# while循环和循环嵌套
# for循环


# while循环
i = 1
while i <= 10:
    print(f"hello world,{i}")
    i +=1


# 死循环
s = 1
while True:
    print(f"hello world,{s}")
    s +=1
    if s >= 1000:
        print("over")
        break


# for循环
fruits = ["apple", "banana", "cherry"]
for fruit in fruits:
    print(fruit)


# for循环计算1-100求和
sum1 = 0
for i in range(1, 101):
    sum1 += i
print(sum1)

# while循环计算1-100求和
sum2 = 0
j = 1
while j<=100:
    sum2 += j
    j += 1
print(sum2)

